<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>computed</title>
	<script src="js/vue.js"></script>
</head>
<body>
		
<div id="app">
	名字1：<input v-model="name1" type="text">
	名字2：<input v-model="name2" type="text">
	<h3>{{name12}}</h3>
	<hr>
	<h3>可传参的计算属性： {{subtotal(12)}}</h3>
</div>

</body>
<script>
let vm = new Vue({
	el:'#app',
	data: {
		name1:'Tom',
		name2:'Jek'
	},
	computed:{
		name12:function(){
			return this.name1 + ',' + this.name2
		},
		subtotal(){
			return function(count){
				let umit = 100;
				return count * umit;
			}
		}
	}
})
</script>
</html>
